"""
写CSV（逗号分隔值）文件
"""
import csv

with open('test.csv', 'w', encoding='gbk') as file:
    csv_writer = csv.writer(file, quoting=csv.QUOTE_ALL)
    csv_writer.writerow(['关羽', 90, 80, 70])
    csv_writer.writerow(['张飞', 75, 92, 50])
    csv_writer.writerow(['赵云', 99, 98, 97])
    csv_writer.writerow(['马超', 95, 82, 55])
    csv_writer.writerow(['黄忠', 90, 80, 90])
